#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	const int N = 20;
	int pSeq[N];
	memset(pSeq, 0, sizeof(int) * N);
	int t;
	cin >>t;
	while (t > 0) {
		int n;
		cin>>n;
		for (int i = 0; i < n; i++) {
			cin>>pSeq[i];
		}

		for (int i = 0; i < n; i++) {
			int j = 0;
			for (j = i; j > 0; j--) {
				if ((pSeq[i] - pSeq[/*j - 1*/j - 1]) >= (i - j + 1)) {
					break;
				} 
				/*if (pSeq[j] >= (i + 1) && ) 
					break;*/
			}
			cout<<i - j + 1;
			if (i != n -1)
				cout<<" ";
		}
		cout<<endl;
		--t;
	}
	return 0;
}